import request from '@/utils/request'
// import { fround } from 'core-js/fn/number'

// 查询
export function getInsectTypeList(data) {
  return request({
    url: `/wikiCategory/query?limit=${data.limit}&page=${data.page}&keyword=${data.keyword}`,
    method: 'get'
  })
}

// 新增
export function addInsectTypeList(data) {
  return request({
    url: `/wikiCategory/insert?wikiCategoryName=${data.wikiCategoryName}`,
    method: 'post'
  })
}

// 删除
export function deleteInsectTypeList(data) {
  return request({
    url: `/wikiCategory/delete/${data.wikiCategoryId}`,
    method: 'delete'
  })
}

// 批量删除
export function deleteInsectTypeLists(data) {
  return request({
    url: `/wikiCategory/deletes?ids%5B%5D=${data.item}`,
    method: 'delete'
  }
  )
}

// 更新
export function updateInsectTypeList(data) {
  return request({
    url: '/wikiCategory/update',
    method: 'put',
    data
  })
}
